using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace CRM.Models.Mapping
{
    public class roleMap : EntityTypeConfiguration<role>
    {
        public roleMap()
        {
            // Primary Key
            this.HasKey(t => t.roleid);

            // Properties
            this.Property(t => t.rolename)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("role");
            this.Property(t => t.roleid).HasColumnName("roleid");
            this.Property(t => t.rolename).HasColumnName("rolename");
            this.Property(t => t.roletype).HasColumnName("roletype");
        }
    }
}
